import request from '@/utils/request'

// 查询方案套餐列表
export function listMeal(query) {
  return request({
    url: '/plan/meal/list',
    method: 'get',
    params: query
  })
}

// 查询方案套餐详细
export function getMeal(mealId) {
  return request({
    url: '/plan/meal/' + mealId,
    method: 'get'
  })
}

// 新增方案套餐
export function addMeal(data) {
  return request({
    url: '/plan/meal',
    method: 'post',
    data: data
  })
}

// 修改方案套餐
export function updateMeal(data) {
  return request({
    url: '/plan/meal',
    method: 'put',
    data: data
  })
}

// 删除方案套餐
export function delMeal(mealId) {
  return request({
    url: '/plan/meal/' + mealId,
    method: 'delete'
  })
}

// 导出方案套餐
export function exportMeal(query) {
  return request({
    url: '/plan/meal/export',
    method: 'get',
    params: query
  })
}


// 启停用
export function stopUsingEnabled(data) {
  return request({
    url: '/plan/meal/stopUsingEnabled',
    method: 'put',
    data: data
  })
}